libobs: Make sure all code paths leave context#13375
Open
suogesi wants to merge 1 commit intoobsproject:masterfrom
Open
libobs: Make sure all code paths leave context#13375suogesi wants to merge 1 commit intoobsproject:masterfrom
suogesi wants to merge 1 commit intoobsproject:masterfrom
Conversation
derrod
approved these changes
Apr 30, 2026
Should always call `gs_leave_context` after `gs_enter_context` or it might cause a lock leave. This commit makes sure all code paths will call `gs_leave_context` if it called `gs_enter_context`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Not calling
gs_leave_contextaftergs_enter_contextcan cause a lock leak. This PR makes sure all code paths inobs_init_video_mixfromlibobs/obs.cwill do this.Motivation and Context
#13366
This is NOT a complete fix of this issue. OBS should show error messages to remind users not to write such resolution because GPU cannot process it.
This PR makes "Stop Recording" work but the output is not as expected. (i.e., if you write "1920x1079" into Settings > Output (Advanced) > Recording > Rescale Output, you won't get a 1920x1079 video. Instead, you get a default resolution.)
How Has This Been Tested?
Types of changes
Checklist: